﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategorySub.ascx.cs" Inherits="BackEnd_CategorySub" %>
<%@ Register src="CategoryModify.ascx" tagname="CategoryModify" tagprefix="uc1" %>
<link href="../WebStyle/Main.css" rel="stylesheet" type="text/css" />
<table id="Table2" cellspacing="1" cellpadding="1">
    <tr>
        <td class="toolbarchungall">
            <b>
                <%=_urlChung %>
                <%--<%=this._Session %>--%>
            </b>
        </td>
    </tr>
    <tr>
        <td class="toolbar" align="right"> 
        <div class="pannelCT">
            Ẩn hiện phần thêm
        </div>
        <div class="contentCT">
            <%--<asp:LinkButton ID="lbtnAdd" runat="server" Text="Thêm mới một danh mục" OnClick="click"></asp:LinkButton>--%>
            <asp:Panel ID="addNew"  runat="server">
                <uc1:CategoryModify ID="CategoryModify1" runat="server" />                    
            </asp:Panel>
        </div>
             
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;
        </td>
    </tr>
    <tr style="text-align: left">
        <td align="center" colspan="4" style="width: 908px">
            <asp:Label ID="labMessage" runat="server" Width="100%" ForeColor="Red" Font-Bold="True"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left">
            <asp:GridView runat="server" ShowHeader="true" ID="grid" BorderColor="#CC9966" BorderStyle="None"
                BorderWidth="1px" RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" Width="100%"
                AlternatingRowStyle-BackColor="#f8f8f8" AlternatingRowStyle-BorderColor="#f8f8f8"
                HeaderStyle-BackColor="#F1F1F1" CellPadding="4" 
                AutoGenerateColumns="False" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True" OnRowEditing="grid_RowEditing" OnRowDeleting="grid_RowDeleting"
                OnRowUpdating="grid_RowUpdating" AllowSorting="True" BackColor="White" ShowFooter="True"
                AllowPaging="True" OnPageIndexChanging="grid_PageIndexChanging" 
                PageSize="20">
                
                <Columns>
                    <asp:TemplateField HeaderText="Tên">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtName" runat="server" CommandName="lbtUpdate" Text='<%#Eval(Component.ColumCategory._Name)%>' 
                           CommandArgument="<%#Eval(Component.ColumCategory._Id) %>">
                            </asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtName" Text="<%#Eval(Component.ColumCategory._Name)%>" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="Tóm tắt">
                        <ItemTemplate>
                           <%#Eval(Component.ColumCategory._Summary)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtSummary" Width="400px" Text='<%#Eval(Component.ColumCategory._Summary)%>' />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    
                    
                   <%-- <asp:TemplateField HeaderText="Ưu tiên">
                        <ItemTemplate>
                            <%#Eval(Component.ColumCategory._Priority)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtPriority" Text="<%#Eval(Component.ColumCategory._Priority)%>" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>   --%>              
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtiu" runat="server" CommandName="lbtCategorySub" Text="Các danh mục con"
                                CommandArgument="<%#Eval(Component.ColumCategory._Id) %>">
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <RowStyle BorderStyle="None" BorderWidth="0px" />
                <HeaderStyle BackColor="#F1F1F1" />
                <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8" />
            </asp:GridView>
        </td>
    </tr>
</table>